;(function() {
	'use strice';
	angular.module('services.userManager.roleGrant', [])
		.factory('roleGrant', function(Restangular) {
			return {
				roleBind: function(params,callback) {
					Restangular.all('sas/sysMng/role/moduleBind').post(params).then(callback);
				},
				roleSelect: function(params,callback) {
					Restangular.all('sas/sysMng/role/query').post(params).then(callback);
				},
				roleModulesQuery: function(params,callback) {
					Restangular.all('sas/sysMng/roleMng/modulesQuery').post(params).then(callback);
				},
				parentRoles: function(callback) {
					Restangular.one('sas/sysMng/role/roleQuery').get().then(callback);
				},
				getQueryData: function() {
					return [{
						queryCode: 'roleCode',
						queryName: '角色编码'
					}, {
						queryCode: 'roleName',
						queryName: '角色名称'
					},{
						queryCode: 'creTime',
						queryName: '创建时间'
					}];
				}
			};
		});
})();
